---
title: "Untitled"
author: "anonymous"
date: "2026-03-04"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r}
pacman::p_load(
  "readr", "tidyverse", "haven", "dplyr", "ggplot2", "jtools", "optmatch", "igraph", 
  "network", "sna","graphlayouts", "readxl", "factoextra", "jsonlite", "openxlsx", 
  "rjson", "tidyjson", "httr", "stringr", "xml2", "writexl"
)
```

```{r}
getwd()
codes <- read_excel("D:/NGEU-Paper/Analysis/MAXQDA24 Code-Relations-Browser_17112025.xlsx")
```



```{r}
###example for exact binomial test
binom.test(12, 20, p = 0.4, alternative = "two.sided")

# values
k <- 12        # observed number of events
n <- 20        # sample size
p0 <- 0.4      # expected shared under null hypothesis

# application of binomial test
result <- binom.test(k, n, p = p0, alternative = "two.sided")

print(result)
```

###Applied to our data 
```{r}
### CDU/CSU and emphasis on temporary, exceptional character of NGEU
##-> limited

cdu_ecu_1 <- 17
n_ecu_1 <- 41
p_cdu <- 0.3161

result <- binom.test(cdu_ecu_1, n_ecu_1, p_cdu, alternative = "two.sided")
print(result)

## growth and investment
cdu_ecu_2 <- 19
n_ecu_2 <- 48

result <- binom.test(cdu_ecu_2, n_ecu_2, p_cdu, alternative = "two.sided")
print(result)  

##employment
cdu_ecu_3 <- 3
n_ecu_3 <- 7

result <- binom.test(cdu_ecu_3, n_ecu_3, p_cdu, alternative = "two.sided")
print(result)  


cdu_ecu_4 <- 14
n_ecu_4 <- 22

result <- binom.test(cdu_ecu_4, n_ecu_4, p_cdu, alternative = "two.sided")
print(result)

##redistribution
cdu_ecu_5 <- 6
n_ecu_5 <- 62

result <- binom.test(cdu_ecu_5, n_ecu_5, p_cdu, alternative = "two.sided")
print(result)

##financial capacity
cdu_ecu_6 <- 26
n_ecu_6 <- 99 

result <- binom.test(cdu_ecu_6, n_ecu_6, p_cdu, alternative = "two.sided")
print(result)


####socio-cultural
cdu_sc_1 <- 21
n_sc_1 <- 66

result <- binom.test(cdu_sc_1, n_sc_1, p_cdu, alternative = "two.sided")
print(result)

##Stereotypes
cdu_sc_2 <- 2
n_sc_2 <- 31

result <- binom.test(cdu_sc_2, n_sc_2, p_cdu, alternative = "two.sided")
print(result)

##Sovereignty
cdu_sc_3 <- 2
n_sc_3 <- 16

result <- binom.test(cdu_sc_3, n_sc_3, p_cdu, alternative = "two.sided")
print(result)

##Solidarity
cdu_sc_4 <- 26
n_sc_4 <- 85

result <- binom.test(cdu_sc_4, n_sc_4, p_cdu, alternative= "two.sided")
print(result)

### denomination: "pi" stands for category "Political-instiutional", _4 refers to 4th subcategory 
cdu_pi_4 <- 30 # number of frames "limited" for CDU/CSU
n_pi_4 <- 39 # number of frames "limited" across all parties
p_cdu <- 0.3161 # excpected share under null hypothesis (all CDU/CSU frames divided by total number of frames in debate: 404/1278)


# here: choose two-sided test
result <- binom.test(cdu_pi_4, n_pi_4, p_cdu, alternative = "two.sided") # choose "greater" if one-sided test is applied
print(result)


##EU integration
cdu_pi_1 <- 46
n_pi_1 <- 160

result <- binom.test(cdu_pi_1, n_pi_1, p_cdu, alternative = "two.sided")
print(result)

## effectiveness
cdu_pi_2 <- 37
n_pi_2 <- 100

result <- binom.test(cdu_pi_2, n_pi_2, p_cdu, alternative = "two.sided")
print(result)

### unlimited
cdu_pi_3 <- 3
n_pi_3 <- 16

result <- binom.test(cdu_pi_3, n_pi_3, p_cdu, alternative = "two.sided")
print(result)

## conditionality
cdu_pi_5 <- 17
n_pi_5 <- 80

result <- binom.test(cdu_pi_5, n_pi_5, p_cdu, alternative = "two.sided")
print(result)

##grants vs. loans
cdu_pi_6 <- 4
n_pi_6 <- 20

result <- binom.test(cdu_pi_6, n_pi_6, p_cdu, alternative = "two.sided")
print(result)

#"existing budgetary framework"
cdu_pi_7 <- 29
n_pi_7 <- 58

result <- binom.test(cdu_pi_7, n_pi_7, p_cdu, alternative = "two.sided") 
print(result)
# also test "greater"
result <- binom.test(cdu_pi_7, n_pi_7, p_cdu, alternative = "greater")
print(result)
## -> significant at p <0.01

binom.test(29,58,0.3161, "two.sided")

#"mode of financing"
cdu_pi_8 <- 38
n_pi_8 <- 152

result <- binom.test(cdu_pi_8, n_pi_8, p_cdu, alternative = "two.sided")
print(result)
#not statistically significant

cdu_pi_9 <- 37
n_pi_9 <- 87

result <- binom.test(cdu_pi_9, n_pi_9, p_cdu, alternative = "two.sided")
print(result)

##democratic accountability
cdu_pi_10 <- 37
n_pi_10 <- 87

result <- binom.test(cdu_pi_10, n_pi_10, p_cdu, alternative = "two.sided")
print(result)

##constitutional

cdu_pi_11 <- 27
n_pi_11 <- 89

result <- binom.test(cdu_pi_11, n_pi_11, p_cdu, alternative = "two.sided")
print(result)

```

```{r}

spd_ecu_1 <- 11
n_ecu_1 <- 41
p_spd <- 0.1534

result <- binom.test(spd_ecu_1, n_ecu_1, p_spd, alternative = "two.sided")
print(result)


##growth and investment 
spd_ecu_2 <- 11
n_ecu_2 <- 48

result <- binom.test(spd_ecu_2, n_ecu_2, p_spd, alternative = "two.sided")
print(result)

###employment
spd_ecu_3 <- 4
n_ecu_3 <- 7

result <- binom.test(spd_ecu_3, n_ecu_3, p_spd, alternative = "two.sided")
print(result)

spd_ecu_4 <- 3
n_ecu_4 <- 22

result <- binom.test(spd_ecu_4, n_ecu_4, p_spd, alternative = "two.sided")
print(result)

##redistribution
spd_ecu_5 <- 3
n_ecu_5 <- 62

result <- binom.test(spd_ecu_5, n_ecu_5, p_spd, alternative = "two.sided")
print(result)


###financial capacity
spd_ecu_6 <- 11
n_ecu_6 <- 99 

result <- binom.test(spd_ecu_6, n_ecu_6, p_spd, alternative = "two.sided")
print(result)

spd_sc_1 <- 31 # number of frames "European identity" for SPD
n_sc_1 <- 66 # total number of frames in subcategory "European identity"
p_spd <- 0.1534 # expected share of SPD under null hypothesis

result <- binom.test(spd_sc_1, n_sc_1, p_spd, alternative = "two.sided")
print(result)

##what if we contrasted the row percentages with the column percentage of a party per ordering category (i.e. all socio-cultural frames of a party)??


p_spd_2 <- 0.219

result <- binom.test(spd_sc_1, n_sc_1, p_spd_2, alternative = "two.sided")
print(result)

## equally highly significant


##stereotypes

spd_sc_2 <- 1
n_sc_2 <- 31

result <- binom.test(spd_sc_2, n_sc_2, p_spd, alternative= "two.sided")
print(result)

##Sovereignty

spd_sc_3 <- 1
n_sc_3 <- 16

result <- binom.test(spd_sc_3, n_sc_3, p_spd, alternative= "two.sided")
print(result)

###
spd_sc_4 <- 30 
n_sc_4 <- 85

result <- binom.test(spd_sc_4, n_sc_4, p_spd, alternative= "two.sided")
print(result)

##Integration

spd_pi_1 <- 31
n_pi_1 <- 160

result <-  binom.test(spd_pi_1, n_pi_1, p_spd, alternative= "two.sided") 
print(result)
## effectiveness

spd_pi_2 <- 11
n_pi_2 <- 100

result <-  binom.test(spd_pi_2, n_pi_2, p_spd, alternative= "two.sided") 
print(result) 

## unlimited
spd_pi_3 <- 5
n_pi_3 <- 16

result <-  binom.test(spd_pi_3, n_pi_3, p_spd, alternative= "two.sided") 
print(result) 

## limited
spd_pi_4 <- 1
n_pi_4 <- 39

result <-  binom.test(spd_pi_4, n_pi_4, p_spd, alternative= "two.sided") 
print(result) 

##conditionality

spd_pi_5 <- 7
n_pi_5 <- 80

result <-  binom.test(spd_pi_5, n_pi_5, p_spd, alternative= "two.sided") 
print(result)  

##grants vs. loans

spd_pi_6 <- 4
n_pi_6 <- 20

result <-  binom.test(spd_pi_6, n_pi_6, p_spd, alternative= "two.sided") 
print(result) 

## existing budgetary framework
spd_pi_7 <- 2
n_pi_7 <- 58
  
result <-  binom.test(spd_pi_7, n_pi_7, p_spd, alternative= "two.sided") 
print(result) 
##also perform one-sided test for lower share

result <-  binom.test(spd_pi_7, n_pi_7, p_spd, alternative= "less") 
print(result) 

spd_pi_9 <- 17
n_pi_9 <- 152

result <- binom.test(spd_pi_9, n_pi_9, p_spd, alternative= "two.sided")

print(result)

spd_pi_10 <- 9
n_pi_10 <- 87
  
result <- binom.test(spd_pi_10, n_pi_10, p_spd, alternative= "two.sided")  
print(result)

#constitutional
spd_pi_11 <- 3
n_pi_11 <- 89

result <- binom.test(spd_pi_11, n_pi_11, p_spd, alternative= "two.sided")  
print(result)
```
### opposition parties
```{r}

###AfD
##national interest
afd_ecu_1 <- 6
n_ecu_1 <- 41
p_afd <- 0.2340

result <- binom.test(afd_ecu_1, n_ecu_1, p_afd, alternative = "two.sided")
print(result)

##EU redistribution
afd_ecu_5 <- 44
n_ecu_5 <- 62

result <- binom.test(afd_ecu_5, n_ecu_5, p_afd, alternative = "two.sided")
print(result)

##Financial capacity
afd_ecu_6 <- 25
n_ecu_6 <- 99

result <- binom.test(afd_ecu_6, n_ecu_6, p_afd, alternative = "two.sided")
print(result)


##European identity
afd_sc_1 <- 1

result <- binom.test(afd_sc_1, n_sc_1, p_afd, alternative = "two.sided")
print(result)

##Stereotypes
afd_sc_2 <- 17
n_sc_2 <- 31

result <- binom.test(afd_sc_2, n_sc_2, p_afd, alternative = "two.sided")
print(result)


##Sovereignty
afd_sc_3 <- 11
n_sc_3 <- 16

result <- binom.test(afd_sc_3, n_sc_3, p_afd, alternative = "two.sided")
print(result)

##Solidarity
afd_sc_4 <- 4
n_sc_4 <- 85

result <- binom.test(afd_sc_4, n_sc_4, p_afd, alternative = "two.sided")
print(result)

##EU integration
afd_pi_1 <- 38

result <- binom.test(afd_pi_1, n_pi_1, p_afd, alternative = "two.sided")
print(result)

##effectivness
afd_pi_2 <- 12

result <- binom.test(afd_pi_2, n_pi_2, p_afd, alternative = "two.sided")
print(result)

##unlimited
afd_pi_3 <- 6


result <- binom.test(afd_pi_3, n_pi_3, p_afd, alternative = "two.sided")
print(result)

###conditionality
afd_pi_5 <- 9
n_pi_5 <- 80

result <- binom.test(afd_pi_5, n_pi_5, p_afd, alternative = "two.sided")
print(result)

##grants vs. loans
afd_pi_6 <- 2
n_pi_6 <- 20

result <- binom.test(afd_pi_6, n_pi_6, p_afd, alternative = "two.sided")
print(result)


##existing budgetary framework
afd_pi_7 <- 12
n_pi_7 <- 58

result <- binom.test(afd_pi_7, n_pi_7, p_afd, alternative = "two.sided")
print(result)

##mode of financing
afd_pi_8 <- 45
n_pi_8 <- 152

result <- binom.test(afd_pi_8, n_pi_8, p_afd, alternative = "two.sided")
print(result)

##democratic accountability

afd_pi_9 <- 18
n_pi_9 <- 87

result <- binom.test(afd_pi_9, n_pi_9, p_afd, alternative = "two.sided")
print(result)

##constitutional

afd_pi_10 <- 48
n_pi_10 <- 89

result <- binom.test(afd_pi_10, n_pi_10, p_afd, alternative = "two.sided")
print(result)

##Grüne

##national interest
gr_ecu_1 <- 5
n_ecu_1 <- 41
p_greens <- 0.1236

result <- binom.test(gr_ecu_1, n_ecu_1, p_greens, alternative = "two.sided")
print(result)

##growth and investment
gr_ecu_2 <- 9

result <- binom.test(gr_ecu_2, n_ecu_2, p_greens, alternative = "two.sided")
print(result)

##employment
gr_ecu_3 <- 0

result <- binom.test(gr_ecu_3, n_ecu_3, p_greens, alternative = "two.sided")
print(result)

##competitiveness
gr_ecu_4 <- 3
result <- binom.test(gr_ecu_4, n_ecu_4, p_greens, alternative = "two.sided")
print(result)

##EU redistribution
gr_ecu_5 <- 2

result <- binom.test(gr_ecu_5, n_ecu_5, p_greens, alternative = "two.sided")
print(result)

##financial capacity
gr_ecu_6 <- 12

result <- binom.test(gr_ecu_6, n_ecu_6, p_greens, alternative = "two.sided")
print(result)


##EU identity
gr_sc_1 <- 5

result <- binom.test(gr_sc_1, n_sc_1, p_greens, alternative = "two.sided")
print(result)

##Stereotypes
gr_sc_2 <- 6

result <- binom.test(gr_sc_2, n_sc_2, p_greens, alternative = "two.sided")
print(result)

##Solidarity 
gr_sc_4 <- 8

result <- binom.test(gr_sc_4, n_sc_4, p_greens, alternative = "two.sided")
print(result)


##EU integration
gr_pi_1 <- 23
n_pi_1 <- 160

result <- binom.test(gr_pi_1, n_pi_1, p_greens, alternative = "two.sided")
print(result)

##Effectiveness
gr_pi_2 <- 20

result <- binom.test(gr_pi_2, n_pi_2, p_greens, alternative = "two.sided")
print(result)

##unlimited
gr_pi_3 <- 1

result <- binom.test(gr_pi_3, n_pi_3, p_greens, alternative = "two.sided")
print(result)

##limited

gr_pi_4 <- 1

result <- binom.test(gr_pi_4, n_pi_4, p_greens, alternative = "two.sided")
print(result)

##Conditionality
gr_pi_5 <- 19

result <- binom.test(gr_pi_5, n_pi_5, p_greens, alternative = "two.sided")
print(result)

##grants vs. loans
gr_pi_6 <- 3
n_pi_6 <- 20

result <- binom.test(gr_pi_6, n_pi_6, p_greens, alternative = "two.sided")
print(result)

##existing budgetary
gr_pi_7 <- 6
n_pi_7 <- 58

result <- binom.test(gr_pi_7, n_pi_7, p_greens, alternative = "two.sided")
print(result)

##mode of financing
gr_pi_8 <- 23
n_pi_8 <- 152

result <- binom.test(gr_pi_8, n_pi_8, p_greens, alternative = "two.sided")
print(result)

##democratic control
gr_pi_9 <- 5
n_pi_9 <- 87

result <- binom.test(gr_pi_9, n_pi_9, p_greens, alternative = "two.sided")
print(result)

##constitutional
gr_pi_10 <- 7

result <- binom.test(gr_pi_10, n_pi_10, p_greens, alternative = "two.sided")
print(result)


###FDP

#national interest
fdp_ecu_1 <- 1
p_fdp <- 0.1283

result <- binom.test(fdp_ecu_1, n_ecu_1, p_fdp, alternative = "two.sided")
print(result)

#growth and investment
fdp_ecu_2 <- 5

result <- binom.test(fdp_ecu_2, n_ecu_2, p_fdp, alternative = "two.sided")
print(result)

#employment
fdp_ecu_3 <- 0

result <- binom.test(fdp_ecu_3, n_ecu_3, p_fdp, alternative = "two.sided")
print(result)

##competitiveness

fdp_ecu_4 <- 2

result <- binom.test(fdp_ecu_4, n_ecu_4, p_fdp, alternative = "two.sided")
print(result)

##EU redistribution
fdp_ecu_5 <- 6

result <- binom.test(fdp_ecu_5, n_ecu_5, p_fdp, alternative = "two.sided")
print(result)

##financial capacity
fdp_ecu_6 <- 19

result <- binom.test(fdp_ecu_6, n_ecu_6, p_fdp, alternative = "two.sided")
print(result)


##European identity
fdp_sc_1 <- 7

result <- binom.test(fdp_sc_1, n_sc_1, p_fdp, alternative = "two.sided")
print(result)

##Stereotypes
fdp_sc_2 <- 5
n_sc_2 <- 31

result <- binom.test(fdp_sc_2, n_sc_2, p_fdp, alternative = "two.sided")
print(result)

##Sovereignty
fdp_sc_3 <- 2

result <- binom.test(fdp_sc_3, n_sc_3, p_fdp, alternative = "two.sided")
print(result)

##Solidarity
fdp_sc_4 <- 8

result <- binom.test(fdp_sc_4, n_sc_4, p_fdp, alternative = "two.sided")
print(result)

##EU integration
fdp_pi_1 <- 18

result <- binom.test(fdp_pi_1, n_pi_1, p_fdp, alternative = "two.sided")
print(result)

##effectiveness
fdp_pi_2 <- 18

result <- binom.test(fdp_pi_2, n_pi_2, p_fdp, alternative = "two.sided")
print(result)
  
##limited
fdp_pi_4 <- 6

result <- binom.test(fdp_pi_4, n_pi_4, p_fdp, alternative = "two.sided")
print(result)

##Conditionality
fdp_pi_5 <- 16

result <- binom.test(fdp_pi_5, n_pi_5, p_fdp, alternative = "two.sided")
print(result)

##grants vs. loans
fdp_pi_6 <- 6

result <- binom.test(fdp_pi_6, n_pi_6, p_fdp, alternative = "two.sided")
print(result)

##existing budgetary framework
fdp_pi_7 <- 7

result <- binom.test(fdp_pi_7, n_pi_7, p_fdp, alternative = "two.sided")
print(result)

##mode of financing
fdp_pi_8 <- 20

result <- binom.test(fdp_pi_8, n_pi_8, p_fdp, alternative = "two.sided")
print(result)

## democratic accountability
fdp_pi_9 <- 17

result <- binom.test(fdp_pi_9, n_pi_9, p_fdp, alternative = "two.sided")
print(result)

##constitutional 
fdp_pi_10 <- 1

result <- binom.test(fdp_pi_10, n_pi_10, p_fdp, alternative = "two.sided")
print(result)


###LINKE

p_left <- 0.046

##national interest
left_ecu_1 <- 1

result <- binom.test(left_ecu_1, n_ecu_1, p_left, alternative = "two.sided")
print(result)

#growth and investment
left_ecu_2 <- 8

result <- binom.test(left_ecu_2, n_ecu_2, p_left, alternative = "two.sided")
print(result)

##EU redistribution
left_ecu_4 <- 1

result <- binom.test(left_ecu_4, n_ecu_4, p_left, alternative = "two.sided")
print(result)

##financial capacity
left_ecu_5 <- 6

result <- binom.test(left_ecu_5, n_ecu_5, p_left, alternative = "two.sided")
print(result)


##European identity
left_sc_1 <- 1

result <- binom.test(left_sc_1, n_sc_1, p_left, alternative = "two.sided")
print(result)

##Solidarity
left_sc_4 <- 9

result <- binom.test(left_sc_4, n_sc_4, p_left, alternative = "two.sided")
print(result)

##EU integration
left_pi_1 <- 4

result <- binom.test(left_pi_1, n_pi_1, p_left, alternative = "two.sided")
print(result)

##Effectivness
left_pi_2 <- 2

result <- binom.test(left_pi_2, n_pi_2, p_left, alternative = "two.sided")
print(result)

##unlimited
left_pi_3 <- 1

result <- binom.test(left_pi_3, n_pi_3, p_left, alternative = "two.sided")
print(result)

##Conditionality
left_pi_5 <- 12

result <- binom.test(left_pi_5, n_pi_5, p_left, alternative = "two.sided")
print(result)

#Grants vs. loans
left_pi_6 <- 1

result <- binom.test(left_pi_6, n_pi_6, p_left, alternative = "two.sided")
print(result)

##Existing framework
left_pi_7 <- 2

result <- binom.test(left_pi_7, n_pi_7, p_left, alternative = "two.sided")
print(result)

##Mode of financing
left_pi_8 <- 9

result <- binom.test(left_pi_8, n_pi_8, p_left, alternative = "two.sided")
print(result)

##Democratic accountability
left_pi_9 <- 1

result <- binom.test(left_pi_9, n_pi_9, p_left, alternative = "two.sided")
print(result)

##Constitutional
left_pi_10 <- 3

result <- binom.test(left_pi_10, n_pi_10, p_left, alternative = "two.sided")
print(result)

```

###Multinomial Test
```{r}
### Rationale: binomial test assumes binary data (e.g. female vs. male; insulin dependent vs. not insulin dependent diabetic)?
### party affiliation can be treated as categorical variable with several, mutually exclusive categories
### -> application of multinomial test


install.packages("XNomial")
library(XNomial)

###Economic-utlitarian frames

## National interest
natint <- c(6, 5, 17, 1, 1, 11)

expected_probs <- c(0.234, 0.1236, 0.3161, 0.1283, 0.0446, 0.1534)

res_xmulti <- xmulti(natint, expected_probs, stat = "Prob")
#-> n.s.

#Growth and investment
growth <- c(0,9,19,5,4,11)
res_xmulti <- xmulti(growth, expected_probs, stat = "Prob")

#Employment
employment <- c(0,0,3,0,0,4)
res_xmulti <- xmulti(employment, expected_probs, stat = "Prob")

#Competitiveness
comp <- c(0,3,14,2,0,3)
res_xmulti <- xmulti(comp, expected_probs, stat = "Prob")

#EU redistribution
redistrib <- c(44,2,6,6,1,3)
res_xmulti <- xmulti(redistrib, expected_probs, stat = "Prob")

#Financial capacity
fincap <- c(25,12,26,19,6,11)
res_xmulti <- xmulti(fincap, expected_probs, stat = "Prob")


### Socio-cultural

EUident <- c(1, 5, 21, 7, 1, 31)

res_xmulti <- xmulti(EUident, expected_probs, stat = "Prob")
## -> highly significant

stereotype <- c(17, 6, 2, 5, 0, 1)
res_xmulti <- xmulti(stereotype, expected_probs, stat = "Prob")

sovereign <- c(11, 0, 2, 2, 0, 1)
res_xmulti <- xmulti(sovereign, expected_probs, stat = "Prob")

### Solidarity

solid <- c(4, 8, 26, 8, 9, 30)
res_xmulti <- xmulti(solid, expected_probs, stat = "Prob")

### Political-institutional
## EU integration
EUint <- c(38, 23, 46, 18, 4, 31)

res_EUint <- xmulti(EUint, expected_probs, stat = "Prob")
## -> n.s.

##effectiveness

effect <- c(12, 20, 37, 18, 2, 11)
res_effect <- xmulti(effect, expected_probs, stat = "Prob")
## sig. at p<0.01


### unlimited
unlimited <- c(6, 1, 3, 0, 1, 5)
res_unlimited <- xmulti(unlimited, expected_probs, stat = "Prob")
### -> n.s.

## "limited"
limited <- c(1, 1, 30, 6, 0, 1)
expected_probs <- c(0.234, 0.1236, 0.3161, 0.1283, 0.0446, 0.1534)
res_xmulti <- xmulti(limited, expected_probs, stat = "Prob")
#-> highly significant

### conditionality
cond <- c(9, 19, 17, 16, 12, 7)
res_cond <-  xmulti(cond, expected_probs, stat = "Prob")

## -> highly significant

##grants vs. loans
grants <- c(2, 3, 4, 6, 1, 4)
res_grants <- xmulti(grants, expected_probs, stat = "Prob")


### existing budgetary framework
budg <- c(12, 6, 29, 7, 2, 2)
res_budg <- xmulti(budg, expected_probs, stat = "Prob")
## -> sig. at p<0.05


### mode of financing

mof <- c(45, 23, 38, 20, 9, 17)
expected_probs <- c(0.234, 0.1236, 0.3161, 0.1283, 0.0446, 0.1534)
res_mof <- xmulti(mof, expected_probs, stat = "Prob")
#-> n.s.


### democratic control?
democr <- c(18, 5, 37, 17, 1, 9)
res_democr <- xmulti(democr, expected_probs, stat = "Prob")

## -> sig. at p<0.05

### und constitutional??

constitutional <- c(48, 7, 27, 1, 3, 3)
expected_probs <- c(0.234, 0.1236, 0.3161, 0.1283, 0.0446, 0.1534)

res_constitutional <- xmulti(constitutional, expected_probs, stat = "Prob")
##-> highly significant


print(res_xmulti)

# Falls du nur den exakten p-Wert (pProb) sehen willst:
###cat("exakter p-value (pProb) =", res_xmulti$pProb, "\n")


##-> highly significant



```


